package router

import (
	"github.com/gin-gonic/gin"
	apis "vrcm/src/vrcm/app/admin/apis/monitor"
	"vrcm/src/vrcm/app/admin/router"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerWorksiteRouter)
}

// registerWorksiteRouter
func registerWorksiteRouter(v1 *gin.RouterGroup) {
	api := apis.Worksite{}
	r := v1.Group("/worksite")
	{
		r.POST("/get-list", api.GetPage)
		r.POST("/get", api.Get)
		r.POST("/insert", api.Insert)
		r.POST("/update", api.Update)
		r.POST("/delete", api.Delete)
		r.POST("/get-worksite-member", api.GetWorksiteMember)

		r.POST("/get-member-list", api.GetMemberPage)
		r.POST("/get-member", api.GetMember)
		r.POST("/get-member-by-authority", api.GetMemberByAuthority)
		r.POST("/insert-member", api.InsertMember)
		r.POST("/update-member", api.UpdateMember)
		r.POST("/delete-member", api.RemoveMember)
		r.POST("/save-worksite-notice", api.SaveWorksiteNotice)
		r.POST("/update-worksite-notice", api.UpdateWorksiteNotice)
		r.POST("/export-worksite-notice", api.ExportWorksiteNotice)
		r.POST("/delete-worksite-notice", api.DeleteWorksiteNotice)
		r.POST("/get-worksite-notice", api.GetWorksiteNotice)
		r.POST("/send-worksite-notice", api.SendWorksiteNotice)
		r.POST("/get-worksite-notices", api.GetWorksiteNotices)
		r.POST("/get-worksite-notice-history", api.GetWorksiteNoticeHistory)
		r.POST("/set-worksite-notice-duration", api.SetWorksiteNoticeDuration)
		r.POST("/set-worksite-authority", api.SetWorksiteAuthority)
		r.POST("/save-tai-ben", api.SaveTaiBen)
		r.POST("/get-tai-ben", api.GetTaiBen)
		r.POST("/delete-tai-ben", api.DeleteTaiBen)
		r.POST("/notice-confirm", api.NoticeConfirm)
	}
}
